/* 活动页面样式 */
:root {
    --primary-color: #3f51b5;
    --secondary-color: #2ecc71;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --border-color: #ddd;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --active-tab-color: #3f51b5;
    --card-radius: 10px;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    color: var(--text-color);
}

/* 页面头部 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: white;
    box-shadow: 0 2px 8px var(--shadow-color);
    z-index: 1000;
    max-width: var(--content-max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.back-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #333;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.header-right {
    display: flex;
    gap: 16px;
}

.header-right i {
    font-size: 22px;
    color: #666;
    cursor: pointer;
}

/* 主要内容区域 */
.main-content {
    margin-top: 56px;
    margin-bottom: 60px;
    max-width: var(--content-max-width);
    margin-left: auto;
    margin-right: auto;
    padding: 15px;
}

/* 筛选栏 */
.filter-section {
    background-color: white;
    border-radius: var(--card-radius);
    margin-bottom: 20px;
    box-shadow: 0 4px 12px var(--shadow-color);
    overflow: hidden;
}

.filter-tabs {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid var(--light-gray);
    scrollbar-width: none;
    -ms-overflow-style: none;
    background-color: #fdfdfd;
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-tabs .tab {
    padding: 14px 16px;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    color: #555;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.filter-tabs .tab:hover {
    color: var(--primary-color);
    background-color: #f0f0f0;
}

.filter-tabs .tab.active {
    color: var(--primary-color);
    font-weight: 600;
    background-color: white;
}

.filter-tabs .tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 0;
}

.filter-options {
    padding: 12px 15px;
    background-color: #fdfdfd;
}

.filter-row {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    align-items: center;
    flex-wrap: wrap;
    padding-bottom: 0;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-label, .sort-label {
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

.select-wrapper {
    position: relative;
    display: inline-block;
}

.select-wrapper select {
    padding: 7px 28px 7px 10px;
    border: 1px solid var(--medium-gray);
    border-radius: 20px;
    background-color: var(--light-gray);
    font-size: 13px;
    appearance: none;
    min-width: 110px;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.select-wrapper select:hover {
    border-color: var(--primary-color);
}

.select-wrapper select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(63, 81, 181, 0.2);
}

.select-wrapper i {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #888;
    font-size: 13px;
}

.sort-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
    flex-wrap: wrap;
    padding-bottom: 0;
}

.sort-label {
    margin-bottom: 5px;
}

.sort-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sort-option {
    font-size: 13px;
    color: #666;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: 1px solid transparent;
    display: inline-block;
    margin-bottom: 5px;
}

.sort-option:hover {
    background-color: #eee;
    color: #333;
}

.sort-option.active {
    color: white;
    font-weight: 500;
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.sort-option.active::after {
    display: none;
}

/* 活动列表 */
.activities-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    background-color: white;
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: 0 2px 6px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.activity-item:active {
    transform: scale(0.98);
    box-shadow: 0 1px 3px var(--shadow-color);
}

.activity-img {
    position: relative;
    flex: 0 0 130px;
    height: 130px;
}

.activity-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: white;
    font-weight: 500;
}

.status.upcoming {
    background-color: var(--primary-color);
}

.status.ongoing {
    background-color: var(--secondary-color);
}

.status.ended {
    background-color: #999;
}

.activity-info {
    flex: 1;
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
}

.activity-info h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.activity-info .time,
.activity-info .location {
    margin: 0 0 6px 0;
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 6px;
}

.activity-info i {
    font-size: 14px;
    color: #888;
}

.activity-meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.participants {
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 4px;
}

.category {
    font-size: 12px;
    padding: 2px 8px;
    background-color: var(--light-gray);
    border-radius: 12px;
    color: #666;
}

.register-btn {
    padding: 6px 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.register-btn:active {
    background-color: #303f9f;
}

.register-btn.disabled {
    background-color: #999;
    cursor: not-allowed;
}

/* 加载更多 */
.load-more {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.load-more-btn {
    padding: 10px 20px;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-btn:active {
    background-color: var(--light-gray);
}

/* 底部导航栏 */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background-color: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 8px var(--shadow-color);
    z-index: 1000;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 8px 0;
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 0;
    cursor: pointer;
    color: #666;
}

.tab-item.active {
    color: var(--primary-color);
}

.tab-item i {
    font-size: 22px;
    margin-bottom: 3px;
}

.tab-item span {
    font-size: 12px;
}

/* iPhone 15 适配 */
@media screen and (width: 390px) and (height: 844px) {
    .header, .tab-bar {
        max-width: 100%;
    }
    
    .main-content {
        max-width: 100%;
    }
    
    .tab-bar {
        padding-bottom: calc(var(--iphone-safe-area-bottom) - 10px);
    }
    
    .filter-tabs .tab {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .filter-options {
        padding: 10px 12px;
    }
    
    .filter-label, .sort-label,
    .select-wrapper select,
    .sort-option {
        font-size: 12px;
    }
    
    .select-wrapper select {
        padding: 6px 24px 6px 8px;
        min-width: 100px;
    }
    
    .sort-option {
        padding: 4px 8px;
    }
    
    .activity-img {
        flex: 0 0 110px;
        height: 110px;
    }
}

/* 深色模式 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #f5f5f5;
        --light-gray: #333;
        --medium-gray: #444;
        --border-color: #555;
        --shadow-color: rgba(0, 0, 0, 0.3);
    }
    
    body {
        background-color: #121212;
    }
    
    .header, 
    .filter-section,
    .activity-item,
    .load-more-btn,
    .tab-bar {
        background-color: #1e1e1e;
    }
    
    .back-btn {
        color: #f5f5f5;
    }
    
    .header-right i {
        color: #bbb;
    }
    
    .filter-tabs {
        border-bottom-color: #333;
        background-color: #2a2a2a;
    }
    
    .filter-tabs .tab {
        color: #bbb;
    }
    
    .filter-tabs .tab:hover {
        color: white;
        background-color: #333;
    }
    
    .filter-tabs .tab.active {
        color: white;
        background-color: #1e1e1e;
    }
    
    .filter-options {
        background-color: #2a2a2a;
    }
    
    .filter-label, .sort-label {
        color: #ccc;
    }
    
    .select-wrapper select {
        border-color: #555;
        background-color: #333;
        color: #f5f5f5;
    }
    
    .select-wrapper select:hover {
        border-color: var(--primary-color);
    }
    
    .select-wrapper select:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 2px rgba(63, 81, 181, 0.3);
    }
    
    .select-wrapper i {
        color: #aaa;
    }
    
    .sort-option {
        color: #bbb;
    }
    
    .sort-option:hover {
        background-color: #444;
        color: white;
    }
    
    .sort-option.active {
        color: white;
        background-color: var(--primary-color);
        border-color: var(--primary-color);
    }
    
    .load-more-btn {
        border-color: #444;
        color: #bbb;
    }
    
    .load-more-btn:active {
        background-color: #333;
    }
} 